<template>
	<view class="rechargeContent">
    <tn-nav-bar fixed alpha customBack>
      <view slot="back" @click="goBack">
        <text class="tn-icon-left-arrow tn-text-lg tn-text-bold tn-color-white"/>
      </view>
    </tn-nav-bar>
    <view :style="{paddingTop: vuex_custom_bar_height + 'px'}" />

    <recharge-list :bean-recharge-list="beanRechargeList" :vip-recharge-list="vipRechargeList"
                   :tv-name="this.tvName" :is-recharge-page="true" :to-tab-index="tabIndex"/>

    <banner-ad :config="adConfig.wx_banner_recharge"/>
  </view>
</template>

<script>
  import common_mixin from '@/libs/mixin/common_mixin.js'
  import RechargeList from "../../components/recharge-list/recharge-list.vue";
  import BannerAd from "../../components/banner-ad/banner-ad.vue";

	export default {
    mixins: [common_mixin],
    components: {
      BannerAd,
      RechargeList,
		},
		data() {
			return {
        tabIndex: 0,
        tvName: "",
        vipRechargeList:[],
        beanRechargeList:[],
			}
		},
		async onLoad(options) {
      if (options.tabIndex) {
        this.tabIndex = parseInt(options.tabIndex)
      }
			if (options.tvName) {
				this.tvName = options.tvName
			}
      let data = await this.$api.getRechargeList();
      this.vipRechargeList = data.vipRechargeList
      this.beanRechargeList = data.beanRechargeList
		},
    async onShow() {
    },
		methods: {
		}
	}
</script>

<style lang="scss" scoped>
	.rechargeContent {
    background: linear-gradient(180deg, #3A3A3A 0%, #000000 100%);
	min-height: 100vh;
	}

</style>
